<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QFSFileEngine Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QFSFileEngine Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QFSFileEngine class implements Qt's default file engine.
<a href="#details">More...</a></p>

<p>Inherits <a href="qabstractfileengine.html">QAbstractFileEngine</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qfsfileengine.html#QFSFileEngine">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qfsfileengine.html#QFSFileEngine-2">__init__</a></b> (<i>self</i>, QString&#160;<i>file</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#caseSensitive">caseSensitive</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#close">close</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#copy">copy</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />QStringList <b><a href="qfsfileengine.html#entryList">entryList</a></b> (<i>self</i>, QDir.Filters&#160;<i>filters</i>, QStringList&#160;<i>filterNames</i>)</li><li><div class="fn" />QAbstractFileEngine.FileFlags <b><a href="qfsfileengine.html#fileFlags">fileFlags</a></b> (<i>self</i>, QAbstractFileEngine.FileFlags&#160;<i>type</i>)</li><li><div class="fn" />QString <b><a href="qfsfileengine.html#fileName">fileName</a></b> (<i>self</i>, QAbstractFileEngine.FileName&#160;<i>file</i>)</li><li><div class="fn" />QDateTime <b><a href="qfsfileengine.html#fileTime">fileTime</a></b> (<i>self</i>, QAbstractFileEngine.FileTime&#160;<i>time</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#flush">flush</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qfsfileengine.html#handle">handle</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#isRelativePath">isRelativePath</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#isSequential">isSequential</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#link">link</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#mkdir">mkdir</a></b> (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>createParentDirectories</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#open">open</a></b> (<i>self</i>, QIODevice.OpenMode&#160;<i>openMode</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#open-2">open</a></b> (<i>self</i>, QIODevice.OpenMode&#160;<i>openMode</i>, int&#160;<i>fd</i>, QFile.FileHandleFlags&#160;<i>handleFlags</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#open-3">open</a></b> (<i>self</i>, QIODevice.OpenMode&#160;<i>flags</i>, int&#160;<i>fd</i>)</li><li><div class="fn" />QString <b><a href="qfsfileengine.html#owner">owner</a></b> (<i>self</i>, QAbstractFileEngine.FileOwner)</li><li><div class="fn" />int <b><a href="qfsfileengine.html#ownerId">ownerId</a></b> (<i>self</i>, QAbstractFileEngine.FileOwner)</li><li><div class="fn" />int <b><a href="qfsfileengine.html#pos">pos</a></b> (<i>self</i>)</li><li><div class="fn" />str <b><a href="qfsfileengine.html#read">read</a></b> (<i>self</i>, int&#160;<i>maxlen</i>)</li><li><div class="fn" />str <b><a href="qfsfileengine.html#readLine">readLine</a></b> (<i>self</i>, int&#160;<i>maxlen</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#remove">remove</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#rename">rename</a></b> (<i>self</i>, QString&#160;<i>newName</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#rmdir">rmdir</a></b> (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>recurseParentDirectories</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#seek">seek</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qfsfileengine.html#setFileName">setFileName</a></b> (<i>self</i>, QString&#160;<i>file</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#setPermissions">setPermissions</a></b> (<i>self</i>, int&#160;<i>perms</i>)</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#setSize">setSize</a></b> (<i>self</i>, int&#160;<i>size</i>)</li><li><div class="fn" />int <b><a href="qfsfileengine.html#size">size</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qfsfileengine.html#write">write</a></b> (<i>self</i>, str&#160;<i>data</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />QString <b><a href="qfsfileengine.html#currentPath">currentPath</a></b> (QString&#160;<i>fileName</i>&#160;=&#160;QString())</li><li><div class="fn" />list-of-QFileInfo <b><a href="qfsfileengine.html#drives">drives</a></b> ()</li><li><div class="fn" />QString <b><a href="qfsfileengine.html#homePath">homePath</a></b> ()</li><li><div class="fn" />QString <b><a href="qfsfileengine.html#rootPath">rootPath</a></b> ()</li><li><div class="fn" />bool <b><a href="qfsfileengine.html#setCurrentPath">setCurrentPath</a></b> (QString&#160;<i>path</i>)</li><li><div class="fn" />QString <b><a href="qfsfileengine.html#tempPath">tempPath</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QFSFileEngine class implements Qt's default file engine.</p>
<p>This class is part of the file engine framework in Qt. If you
only want to access files or directories, use <a href="qfile.html">QFile</a>, <a href="qfileinfo.html">QFileInfo</a> or
<a href="qdir.html">QDir</a> instead.</p>
<p>QFSFileEngine is the default file engine for accessing regular
files. It is provided for convenience; by subclassing this class,
you can alter its behavior slightly, without having to write a
complete <a href="qabstractfileengine.html">QAbstractFileEngine</a>
subclass. To install your custom file engine, you must also
subclass <a href="qabstractfileenginehandler.html">QAbstractFileEngineHandler</a>
and create an instance of your handler.</p>
<p>It can also be useful to create a QFSFileEngine object directly
if you need to use the local file system inside <a href="qabstractfileengine.html#create">QAbstractFileEngine.create</a>(),
in order to avoid recursion (as higher-level classes tend to call
<a href="qabstractfileengine.html#create">QAbstractFileEngine.create</a>()).</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QFSFileEngine" />QFSFileEngine.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qfsfileengine.html">QFSFileEngine</a>.</p>


<h3 class="fn"><a name="QFSFileEngine-2" />QFSFileEngine.__init__ (<i>self</i>, QString&#160;<i>file</i>)</h3><p>Constructs a <a href="qfsfileengine.html">QFSFileEngine</a> for
the file name <i>file</i>.</p>


<h3 class="fn"><a name="caseSensitive" />bool QFSFileEngine.caseSensitive (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#caseSensitive">QAbstractFileEngine.caseSensitive</a>().</p>
<p>Returns true for Windows, false for Unix.</p>


<h3 class="fn"><a name="close" />bool QFSFileEngine.close (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#close">QAbstractFileEngine.close</a>().</p>


<h3 class="fn"><a name="copy" />bool QFSFileEngine.copy (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#copy">QAbstractFileEngine.copy</a>().</p>
<p>For windows, copy the file to file <i>copyName</i>.</p>
<p>Not implemented for Unix.</p>


<h3 class="fn"><a name="currentPath" />QString QFSFileEngine.currentPath (QString&#160;<i>fileName</i>&#160;=&#160;QString())</h3><p>For Unix, returns the current working directory for the file
engine.</p>
<p>For Windows, returns the canonicalized form of the current path
used by the file engine for the drive specified by <i>fileName</i>.
On Windows, each drive has its own current directory, so a
different path is returned for file names that include different
drive names (e.g. A: or C:).</p>
<p><b>See also</b> <a href="qfsfileengine.html#setCurrentPath">setCurrentPath</a>().</p>


<h3 class="fn"><a name="drives" />list-of-QFileInfo QFSFileEngine.drives ()</h3><p>For Windows, returns the list of drives in the file system as a
list of <a href="qfileinfo.html">QFileInfo</a> objects. On unix,
Mac OS X and Windows CE, only the root path is returned. On
Windows, this function returns all drives (A:, C:, D:, etc.).</p>
<p>For Unix, the list contains just the root path "/".</p>


<h3 class="fn"><a name="entryList" />QStringList QFSFileEngine.entryList (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>&#160;<i>filters</i>, QStringList&#160;<i>filterNames</i>)</h3><h3 class="fn"><a name="fileFlags" /><a href="qabstractfileengine-fileflags.html">QAbstractFileEngine.FileFlags</a> QFSFileEngine.fileFlags (<i>self</i>, <a href="qabstractfileengine-fileflags.html">QAbstractFileEngine.FileFlags</a>&#160;<i>type</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#fileFlags">QAbstractFileEngine.fileFlags</a>().</p>


<h3 class="fn"><a name="fileName" />QString QFSFileEngine.fileName (<i>self</i>, <a href="qabstractfileengine.html#FileName-enum">QAbstractFileEngine.FileName</a>&#160;<i>file</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#fileName">QAbstractFileEngine.fileName</a>().</p>
<p><b>See also</b> <a href="qfsfileengine.html#setFileName">setFileName</a>().</p>


<h3 class="fn"><a name="fileTime" /><a href="qdatetime.html">QDateTime</a> QFSFileEngine.fileTime (<i>self</i>, <a href="qabstractfileengine.html#FileTime-enum">QAbstractFileEngine.FileTime</a>&#160;<i>time</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#fileTime">QAbstractFileEngine.fileTime</a>().</p>


<h3 class="fn"><a name="flush" />bool QFSFileEngine.flush (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#flush">QAbstractFileEngine.flush</a>().</p>


<h3 class="fn"><a name="handle" />int QFSFileEngine.handle (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#handle">QAbstractFileEngine.handle</a>().</p>


<h3 class="fn"><a name="homePath" />QString QFSFileEngine.homePath ()</h3><p>Returns the home path of the current user.</p>
<p><b>See also</b> <a href="qfsfileengine.html#rootPath">rootPath</a>().</p>


<h3 class="fn"><a name="isRelativePath" />bool QFSFileEngine.isRelativePath (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#isRelativePath">QAbstractFileEngine.isRelativePath</a>().</p>


<h3 class="fn"><a name="isSequential" />bool QFSFileEngine.isSequential (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#isSequential">QAbstractFileEngine.isSequential</a>().</p>


<h3 class="fn"><a name="link" />bool QFSFileEngine.link (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#link">QAbstractFileEngine.link</a>().</p>
<p>Creates a link from the file currently specified by <a href="qfsfileengine.html#fileName">fileName</a>() to <i>newName</i>.
What a link is depends on the underlying filesystem (be it a
shortcut on Windows or a symbolic link on Unix). Returns true if
successful; otherwise returns false.</p>


<h3 class="fn"><a name="mkdir" />bool QFSFileEngine.mkdir (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>createParentDirectories</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#mkdir">QAbstractFileEngine.mkdir</a>().</p>


<h3 class="fn"><a name="open" />bool QFSFileEngine.open (<i>self</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a>&#160;<i>openMode</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#open">QAbstractFileEngine.open</a>().</p>


<h3 class="fn"><a name="open-2" />bool QFSFileEngine.open (<i>self</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a>&#160;<i>openMode</i>, int&#160;<i>fd</i>, <a href="qfile-filehandleflags.html">QFile.FileHandleFlags</a>&#160;<i>handleFlags</i>)</h3><p>Opens the file handle <i>fh</i> in <i>openMode</i> mode. Returns
true on success; otherwise returns false.</p>


<h3 class="fn"><a name="open-3" />bool QFSFileEngine.open (<i>self</i>, <a href="qiodevice-openmode.html">QIODevice.OpenMode</a>&#160;<i>flags</i>, int&#160;<i>fd</i>)</h3><p>Opens the file descriptor <i>fd</i> in <i>openMode</i> mode.
Returns true on success; otherwise returns false.</p>


<h3 class="fn"><a name="owner" />QString QFSFileEngine.owner (<i>self</i>, <a href="qabstractfileengine.html#FileOwner-enum">QAbstractFileEngine.FileOwner</a>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#owner">QAbstractFileEngine.owner</a>().</p>


<h3 class="fn"><a name="ownerId" />int QFSFileEngine.ownerId (<i>self</i>, <a href="qabstractfileengine.html#FileOwner-enum">QAbstractFileEngine.FileOwner</a>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#ownerId">QAbstractFileEngine.ownerId</a>().</p>
<p>In Unix, if stat() is successful, the <tt>uid</tt> is returned
if <i>own</i> is the owner. Otherwise the <tt>gid</tt> is returned.
If stat() is unsuccessful, -2 is reuturned.</p>
<p>For Windows, -2 is always returned.</p>


<h3 class="fn"><a name="pos" />int QFSFileEngine.pos (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#pos">QAbstractFileEngine.pos</a>().</p>


<h3 class="fn"><a name="read" />str QFSFileEngine.read (<i>self</i>, int&#160;<i>maxlen</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#read">QAbstractFileEngine.read</a>().</p>


<h3 class="fn"><a name="readLine" />str QFSFileEngine.readLine (<i>self</i>, int&#160;<i>maxlen</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#readLine">QAbstractFileEngine.readLine</a>().</p>


<h3 class="fn"><a name="remove" />bool QFSFileEngine.remove (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#remove">QAbstractFileEngine.remove</a>().</p>


<h3 class="fn"><a name="rename" />bool QFSFileEngine.rename (<i>self</i>, QString&#160;<i>newName</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#rename">QAbstractFileEngine.rename</a>().</p>


<h3 class="fn"><a name="rmdir" />bool QFSFileEngine.rmdir (<i>self</i>, QString&#160;<i>dirName</i>, bool&#160;<i>recurseParentDirectories</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#rmdir">QAbstractFileEngine.rmdir</a>().</p>


<h3 class="fn"><a name="rootPath" />QString QFSFileEngine.rootPath ()</h3><p>Returns the root path.</p>
<p><b>See also</b> <a href="qfsfileengine.html#homePath">homePath</a>().</p>


<h3 class="fn"><a name="seek" />bool QFSFileEngine.seek (<i>self</i>, int)</h3><p>Reimplemented from <a href="qabstractfileengine.html#seek">QAbstractFileEngine.seek</a>().</p>


<h3 class="fn"><a name="setCurrentPath" />bool QFSFileEngine.setCurrentPath (QString&#160;<i>path</i>)</h3><p>Sets the current path (e.g., for <a href="qdir.html">QDir</a>),
to <i>path</i>. Returns true if the new path exists; otherwise this
function does nothing, and returns false.</p>
<p><b>See also</b> <a href="qfsfileengine.html#currentPath">currentPath</a>().</p>


<h3 class="fn"><a name="setFileName" />QFSFileEngine.setFileName (<i>self</i>, QString&#160;<i>file</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#setFileName">QAbstractFileEngine.setFileName</a>().</p>
<p><b>See also</b> <a href="qfsfileengine.html#fileName">fileName</a>().</p>


<h3 class="fn"><a name="setPermissions" />bool QFSFileEngine.setPermissions (<i>self</i>, int&#160;<i>perms</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#setPermissions">QAbstractFileEngine.setPermissions</a>().</p>


<h3 class="fn"><a name="setSize" />bool QFSFileEngine.setSize (<i>self</i>, int&#160;<i>size</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#setSize">QAbstractFileEngine.setSize</a>().</p>
<p><b>See also</b> <a href="qfsfileengine.html#size">size</a>().</p>


<h3 class="fn"><a name="size" />int QFSFileEngine.size (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#size">QAbstractFileEngine.size</a>().</p>
<p><b>See also</b> <a href="qfsfileengine.html#setSize">setSize</a>().</p>


<h3 class="fn"><a name="tempPath" />QString QFSFileEngine.tempPath ()</h3><p>Returns the temporary path (i.e., a path in which it is safe to
store temporary files).</p>


<h3 class="fn"><a name="write" />int QFSFileEngine.write (<i>self</i>, str&#160;<i>data</i>)</h3><p>Reimplemented from <a href="qabstractfileengine.html#write">QAbstractFileEngine.write</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>